package com.mercury.pattern._08_composite;

/**
 *
 */
public class Client {
    public static void main(String[] args) {
        ColleageComponent university = new University("清华大学","985");
        ColleageComponent colleage = new College("计算机院","计算机院2");
        ColleageComponent colleage2 = new College("软件院","软件院2");

        ColleageComponent dept = new Department("计算机科学与技术","计算机科学与技术2");
        ColleageComponent dept2 = new Department("电子商务","电子商务2");

        ColleageComponent dept3 = new Department("软件工程","软件工程2");

        university.add(colleage);
        university.add(colleage2);

        colleage.add(dept);
        colleage.add(dept2);

        colleage2.add(dept3);

        university.print();
    }
}